package com.vishop.services;

import java.util.Collection;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.vishop.daos.MerkDaoImpl;
import com.vishop.models.Merk;

@Service
public class MerkServiceImpl implements MerkService {
 
    @Autowired
    private MerkDaoImpl merkDao;
     
    @Transactional
    public int save(Merk merk){
   		return merkDao.save(merk);
   	}
    
    @Transactional
    public Merk getById(int id){
    	return merkDao.getById(id);
    }
    
    @Transactional
    public Collection<Merk> getAll(){
    	return merkDao.getAll();
    }  
    
    @Transactional
    public void update(Merk merk){
    	merkDao.update(merk);
    }
    
    @Transactional
    public void delete(int id){
    	merkDao.delete(id);
	}
    
}
